This is the documentation for the Realbasic Plugins from Monkeybreadsoftware.de. You find these plugins and the newest version of this document at http://www.monkeybreadsoftware.de/realbasic inside the plugins section.
This help was last updated on Freitag, 6. September 2002 and covers 2136 items: 126 classes, 2 controls and 583 global functions.
The list of the themes | Global methods by category | Global methods by name | The list of the classes | The list of the controls |
AskDisplay(title As String) As Display | ||||
global method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Askdisplay shows a dialog to the user to choose a display. | ||||
Example:
dim d as display d=askDisplay("hallo") if d<>Nil then msgBox str(d.Width)+"x"+str(d.height) end if | ||||
Notes:
Returns the current display if you have only one display. | ||||
class Display | ||||
class, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Defines a class for accessing the displays of the screen. | ||||
CanDepth(depth As Integer) As Boolean | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Returns true if the monitor supports the given color depth at the current resolution. | ||||
Notes:
none. | ||||
Depth as integer | ||||
property, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Depth of the display. | ||||
Notes:
Can be 8, 16 or 32. Other screen depths are not well supported. | ||||
displaynum as integer | ||||
property, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
DisplayNum is the number of the display | ||||
Notes:
The number is always between 0 and DisplayCount()-1, where 0 is the main monitor. | ||||
FadeGamma(intensity As Integer, col As Color) | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Sets the gamma of the display | ||||
Notes:
Intensity has to be between 0 and 1000. 1000 is normal, when it is 0, the whole display is in the color GammaColor. | ||||
FadeGammaTo(intensity As Integer, col As Color, millis As Integer) | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Fades the intensity and color of the gamma slowly in the given number of milliseconds. | ||||
Notes:
Intensity has to be between 0 and 1000. 1000 is normal, when it is 0, the whole display is in the color GammaColor. | ||||
GammaColor as color | ||||
property, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Does nothing. | ||
Function:
The color for fading the display. | ||||
Notes:
This property is read-only. To change it, use the methods of the Display class and the Switch method of the Resolution class. There is no fading for Windows. | ||||
GammaIntensity as integer | ||||
property, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Does nothing. | ||
Function:
GammaIntensity is the intensity of the monitor. | ||||
Notes:
1000 is normal, if it is 0, the whole display is in the color GammaColor. This property is read-only. To change it, use the methods of the Display class and the Switch method of the Resolution class. There is no fading for Windows. | ||||
GetBestResolution(width As Integer, height As Integer, depth As Integer, safe As Boolean) As Resolution | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Searches for the best matching resolution. | ||||
Notes:
Returns the best resolution which size is not smaller that the dimensions given, which has the given depth and, if safe is true, which is safe. If safe is not true, be sure that the frequency works, if you want to switch to it (for example by asking the user). On Mac OS X till now no resolution can be called safe. | ||||
GetBestResolution(width As Integer, height As Integer, safe As Boolean) As Resolution | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Searches for the best matching resolution. | ||||
Notes:
Returns the best resolution which size is not smaller that the dimensions given, which has the highest depth and, if safe is true, which is safe. If safe is not true, be sure that the frequency works, if you want to switch to it (for example by asking the user). On Mac OS X till now no resolution can be called safe. | ||||
GetCurrentResolution() As Resolution | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Returns the current resolution. | ||||
Notes:
Returns the resolution the display is currently set to. This is useful if you want to switch back to the old resolution after you switched to another resolution. | ||||
GetLargestResolution(depth As Integer, safe As Boolean) As Resolution | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Searches for the largest resolution with the given depth. | ||||
Notes:
The same as GetBestResolution(width, height, depth, safe), the only difference is that it does not search for the smallest resolution but for the biggest one. On Mac OS X till now no resolution can be called safe. | ||||
GetLargestResolution(safe As Boolean) As Resolution | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Searches for the largest resolution. | ||||
Notes:
If safe is true, this method returns only safe resolutions. On Mac OS X till now no resolution can be called safe. | ||||
GetResolution(num As Integer, safe As Boolean) As Resolution | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Returns a resolution. | ||||
Notes:
Num has to be between 0 and ResolutionCount(safe)-1. | ||||
Height as integer | ||||
property, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Height of the monitor. | ||||
hz as integer | ||||
property, Resolution | Mi, 28. Aug 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
frequency in Hz of that display | ||||
Example:
dim d as display d=getdisplay(0) msgBox str(d.Hz) | ||||
Notes:
On Windows: Sometimes Hz is 0, this is when Windows itself does not know the frequency (at least it is so in my emulation, Virtual PC 3.0 with Win95). The value should never be greater as the real frequency, so you can just ignore this. | ||||
Left as integer | ||||
property, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
The relative left offset to the other monitors. | ||||
Notes:
Should be 0 for the main monitor. | ||||
ResolutionCount(depth As Integer, safe As Boolean) As Integer | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Returns the number of resolutions for a given depth. | ||||
Notes:
This method returns the number of resolutions that have the given depth and, if safe is true, which are safe. On Mac OS X till now no resolution can be called safe. | ||||
ResolutionCount(safe As Boolean) As Integer | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Returns the number of resolutions. | ||||
Notes:
This method returns the total number of resolutions this monitor supports and, if safe is true, which are safe. Safe resolutions are resolutions which will always work. On Mac OS X till now no resolution can be called safe. | ||||
SetDepth(depth As Integer) As Boolean | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Switches the color depth to the depth given. Returns true if attempt was successful. | ||||
Notes:
none. | ||||
SwitchTo(width As Integer, height As Integer, depth As Integer, safe As Boolean) As Boolean | ||||
method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Switches to the given resolution if possible. | ||||
Notes:
This method tries to switch directly to the best resolution which size is bigger or the same as the given dimensions and which depth is the same as the given parameter. It returnes true if it was successful. Try this function first with safe set to true. If that fails, try again with false, but after that show a dialog asking the user if that resolution is okay. If the user presses escape or clicks cancel, you should immediatly switch back to the old resolution. On Mac OS X till now no resolution can be called safe. | ||||
Top as integer | ||||
property, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
The relative top offset to the other monitors. | ||||
Notes:
Should be 0 for the main monitor. | ||||
Width as integer | ||||
property, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Width of this screen. | ||||
DisplayCount() As Integer | ||||
global method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
DisplayCount returns the number of displays connected. | ||||
Example:
msgbox "You have "+str(displaycount)+" screens." | ||||
GetDisplay(num As Integer) As Display | ||||
global method, Resolution | Mo, 15. Jul 2002 | |||
Mac OS Classic: Works. | Mac OS Carbon: Works. | Windows: Works. | ||
Function:
Returns an object of class display for the given display. | ||||
Example:
dim d as display d=getdisplay(0) msgBox str(d.width)+" x "+str(d.height)+" @ "+str(pow(2,d.depth))+" colors" | ||||
Notes:
num must be: 0 <= num < displaycount |
Written 2002 by Christian Schmitz. Feel free to ask or report mistakes to realbasic@macsw.de.
Thanks.